/*
 * An XML document type.
 * Localname: assignment
 * Namespace: urn:jbpm.org:jpdl-3.2
 * Java type: x2.orgJpdl3.jbpm.AssignmentDocument
 *
 * Automatically generated - do not modify.
 */
package x2.orgJpdl3.jbpm.impl;
/**
 * A document containing one assignment(@urn:jbpm.org:jpdl-3.2) element.
 *
 * This is a complex type.
 */
public class AssignmentDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.AssignmentDocument
{
    private static final long serialVersionUID = 1L;
    
    public AssignmentDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ASSIGNMENT$0 = 
        new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "assignment");
    
    
    /**
     * Gets the "assignment" element
     */
    public x2.orgJpdl3.jbpm.AssignmentDocument.Assignment getAssignment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.AssignmentDocument.Assignment target = null;
            target = (x2.orgJpdl3.jbpm.AssignmentDocument.Assignment)get_store().find_element_user(ASSIGNMENT$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "assignment" element
     */
    public void setAssignment(x2.orgJpdl3.jbpm.AssignmentDocument.Assignment assignment)
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.AssignmentDocument.Assignment target = null;
            target = (x2.orgJpdl3.jbpm.AssignmentDocument.Assignment)get_store().find_element_user(ASSIGNMENT$0, 0);
            if (target == null)
            {
                target = (x2.orgJpdl3.jbpm.AssignmentDocument.Assignment)get_store().add_element_user(ASSIGNMENT$0);
            }
            target.set(assignment);
        }
    }
    
    /**
     * Appends and returns a new empty "assignment" element
     */
    public x2.orgJpdl3.jbpm.AssignmentDocument.Assignment addNewAssignment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.AssignmentDocument.Assignment target = null;
            target = (x2.orgJpdl3.jbpm.AssignmentDocument.Assignment)get_store().add_element_user(ASSIGNMENT$0);
            return target;
        }
    }
    /**
     * An XML assignment(@urn:jbpm.org:jpdl-3.2).
     *
     * This is a complex type.
     */
    public static class AssignmentImpl extends x2.orgJpdl3.jbpm.impl.DelegationImpl implements x2.orgJpdl3.jbpm.AssignmentDocument.Assignment
    {
        private static final long serialVersionUID = 1L;
        
        public AssignmentImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName EXPRESSION$0 = 
            new javax.xml.namespace.QName("", "expression");
        private static final javax.xml.namespace.QName ACTORID$2 = 
            new javax.xml.namespace.QName("", "actor-id");
        private static final javax.xml.namespace.QName POOLEDACTORS$4 = 
            new javax.xml.namespace.QName("", "pooled-actors");
        
        
        /**
         * Gets the "expression" attribute
         */
        public java.lang.String getExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXPRESSION$0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "expression" attribute
         */
        public org.apache.xmlbeans.XmlString xgetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXPRESSION$0);
                return target;
            }
        }
        
        /**
         * True if has "expression" attribute
         */
        public boolean isSetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(EXPRESSION$0) != null;
            }
        }
        
        /**
         * Sets the "expression" attribute
         */
        public void setExpression(java.lang.String expression)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXPRESSION$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXPRESSION$0);
                }
                target.setStringValue(expression);
            }
        }
        
        /**
         * Sets (as xml) the "expression" attribute
         */
        public void xsetExpression(org.apache.xmlbeans.XmlString expression)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXPRESSION$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(EXPRESSION$0);
                }
                target.set(expression);
            }
        }
        
        /**
         * Unsets the "expression" attribute
         */
        public void unsetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(EXPRESSION$0);
            }
        }
        
        /**
         * Gets the "actor-id" attribute
         */
        public java.lang.String getActorId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ACTORID$2);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "actor-id" attribute
         */
        public org.apache.xmlbeans.XmlString xgetActorId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ACTORID$2);
                return target;
            }
        }
        
        /**
         * True if has "actor-id" attribute
         */
        public boolean isSetActorId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ACTORID$2) != null;
            }
        }
        
        /**
         * Sets the "actor-id" attribute
         */
        public void setActorId(java.lang.String actorId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ACTORID$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ACTORID$2);
                }
                target.setStringValue(actorId);
            }
        }
        
        /**
         * Sets (as xml) the "actor-id" attribute
         */
        public void xsetActorId(org.apache.xmlbeans.XmlString actorId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ACTORID$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ACTORID$2);
                }
                target.set(actorId);
            }
        }
        
        /**
         * Unsets the "actor-id" attribute
         */
        public void unsetActorId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ACTORID$2);
            }
        }
        
        /**
         * Gets the "pooled-actors" attribute
         */
        public java.lang.String getPooledActors()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(POOLEDACTORS$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "pooled-actors" attribute
         */
        public org.apache.xmlbeans.XmlString xgetPooledActors()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(POOLEDACTORS$4);
                return target;
            }
        }
        
        /**
         * True if has "pooled-actors" attribute
         */
        public boolean isSetPooledActors()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(POOLEDACTORS$4) != null;
            }
        }
        
        /**
         * Sets the "pooled-actors" attribute
         */
        public void setPooledActors(java.lang.String pooledActors)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(POOLEDACTORS$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(POOLEDACTORS$4);
                }
                target.setStringValue(pooledActors);
            }
        }
        
        /**
         * Sets (as xml) the "pooled-actors" attribute
         */
        public void xsetPooledActors(org.apache.xmlbeans.XmlString pooledActors)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(POOLEDACTORS$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(POOLEDACTORS$4);
                }
                target.set(pooledActors);
            }
        }
        
        /**
         * Unsets the "pooled-actors" attribute
         */
        public void unsetPooledActors()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(POOLEDACTORS$4);
            }
        }
    }
}
